const http = require('http')
const PORT = 9002

const server = http.createServer(function (req, res) {
  res.setHeader('Content-Type', 'text/plain; charset=utf-8')
  if (req.url === '/a') {
    for (var i = 0; i < 5000000000; ++i) {
      var random = Math.random()
    }
    res.end('/a结束了')
  } else {
    res.end('/b结束了')
  }
})

server.listen(PORT, function () {
  console.log(`服务正在运行：http://localhost:${PORT}`)
})
